package faas

import (
	"context"
	"flow-calc/core"
	"flow-calc/core/log"
)

// AbortHandler 中断处理
func AbortHandler(ctx context.Context, flow core.Flow) error {
	log.Logger().InfoCtx(ctx, "---------------> %s <----------------", "AbortHandler中断处理")
	for _, row := range flow.Input() {
		log.Logger().Info("当前函数: %s , FunID: %s, row: %s", flow.GetExecFuncConf().FName, flow.GetExecFunction().GetId(), row)
	}
	return flow.Next(core.ActionAbort)
}
